package edu.tju.moralManage;

import java.sql.SQLException;
import java.util.List;

import com.ibatis.sqlmap.client.SqlMapClient;
import com.younker.waf.db.IBatisConfig;

import edu.tju.classes.AdvisorHistory;

public class IbatisAppraiseSetTimeDao implements IAppraiseSetTimeDao{
	protected SqlMapClient sqlMap = IBatisConfig.getSqlMapInstance();

	
	public void deleteAppraiseSetTime(long id) throws SQLException {
	
		sqlMap.delete("deleteAppraiseSetTime", id);
	}

	public List<AppraiseSetTime> getAppraiseSetTimeAnd(	AppraiseSetTime appraiseSetTime) throws SQLException {
	
		return  sqlMap.queryForList("getAppraiseSetTimeAnd", appraiseSetTime);
	}

	public AppraiseSetTime getAppraiseSetTimeById(long id) throws SQLException {
	
		return (AppraiseSetTime) sqlMap.queryForObject("getAppraiseSetTimeById", id);
	}

	public Long insertAppraiseSetTime(AppraiseSetTime appraiseSetTime)
			throws SQLException {
		return (Long)sqlMap.insert("insertAppraiseSetTime", appraiseSetTime); 
	}

	@Override
	public int updateAppraiseSetTime(AppraiseSetTime appraiseSetTime)
			throws SQLException {
		return sqlMap.update("updateAppraiseSetTime", appraiseSetTime);
	}
	
	
	
	
	
	
	
	
	
	
	
	
	
	

}
